import { int } from "./util";

declare enum AbilityIntField {
    ABILITY_IF_BUTTON_POSITION_NORMAL_X,
    ABILITY_IF_BUTTON_POSITION_NORMAL_Y,
    ABILITY_IF_BUTTON_POSITION_ACTIVATED_X,
    ABILITY_IF_BUTTON_POSITION_ACTIVATED_Y,
    ABILITY_IF_BUTTON_POSITION_RESEARCH_X,
    ABILITY_IF_BUTTON_POSITION_RESEARCH_Y,
    ABILITY_IF_MISSILE_SPEED,
    ABILITY_IF_TARGET_ATTACHMENTS,
    ABILITY_IF_CASTER_ATTACHMENTS,
    ABILITY_IF_PRIORITY,
    ABILITY_IF_LEVELS,
    ABILITY_IF_REQUIRED_LEVEL,
    ABILITY_IF_LEVEL_SKIP_REQUIREMENT
}

declare enum AbilityBooleanField {
    ABILITY_BF_HERO_ABILITY,
    ABILITY_BF_ITEM_ABILITY,
    ABILITY_BF_CHECK_DEPENDENCIES
}

declare enum AbilityRealField {
    ABILITY_RF_ARF_MISSILE_ARC
}

declare enum AbilityStringField {
    ABILITY_SF_NAME,
    ABILITY_SF_ICON_ACTIVATED,
    ABILITY_SF_ICON_RESEARCH,
    ABILITY_SF_EFFECT_SOUND,
    ABILITY_SF_EFFECT_SOUND_LOOPING
}

declare enum AbilityIntLevelField {
    ABILITY_ILF_MANA_COST,
    ABILITY_ILF_NUMBER_OF_WAVES,
    ABILITY_ILF_NUMBER_OF_SHARDS,
    ABILITY_ILF_NUMBER_OF_UNITS_TELEPORTED,
    ABILITY_ILF_SUMMONED_UNIT_COUNT_HWE2,
    ABILITY_ILF_NUMBER_OF_IMAGES,
    ABILITY_ILF_NUMBER_OF_CORPSES_RAISED_UAN1,
    ABILITY_ILF_MORPHING_FLAGS,
    ABILITY_ILF_STRENGTH_BONUS_NRG5,
    ABILITY_ILF_DEFENSE_BONUS_NRG6,
    ABILITY_ILF_NUMBER_OF_TARGETS_HIT,
    ABILITY_ILF_DETECTION_TYPE_OFS1,
    ABILITY_ILF_NUMBER_OF_SUMMONED_UNITS_OSF2,
    ABILITY_ILF_NUMBER_OF_SUMMONED_UNITS_EFN1,
    ABILITY_ILF_NUMBER_OF_CORPSES_RAISED_HRE1,
    ABILITY_ILF_STACK_FLAGS,
    ABILITY_ILF_MINIMUM_NUMBER_OF_UNITS,
    ABILITY_ILF_MAXIMUM_NUMBER_OF_UNITS_NDP3,
    ABILITY_ILF_NUMBER_OF_UNITS_CREATED_NRC2,
    ABILITY_ILF_SHIELD_LIFE,
    ABILITY_ILF_MANA_LOSS_AMS4,
    ABILITY_ILF_GOLD_PER_INTERVAL_BGM1,
    ABILITY_ILF_MAX_NUMBER_OF_MINERS,
    ABILITY_ILF_CARGO_CAPACITY,
    ABILITY_ILF_MAXIMUM_CREEP_LEVEL_DEV3,
    ABILITY_ILF_MAX_CREEP_LEVEL_DEV1,
    ABILITY_ILF_GOLD_PER_INTERVAL_EGM1,
    ABILITY_ILF_DEFENSE_REDUCTION,
    ABILITY_ILF_DETECTION_TYPE_FLA1,
    ABILITY_ILF_FLARE_COUNT,
    ABILITY_ILF_MAX_GOLD,
    ABILITY_ILF_MINING_CAPACITY,
    ABILITY_ILF_MAXIMUM_NUMBER_OF_CORPSES_GYD1,
    ABILITY_ILF_DAMAGE_TO_TREE,
    ABILITY_ILF_LUMBER_CAPACITY,
    ABILITY_ILF_GOLD_CAPACITY,
    ABILITY_ILF_DEFENSE_INCREASE_INF2,
    ABILITY_ILF_INTERACTION_TYPE,
    ABILITY_ILF_GOLD_COST_NDT1,
    ABILITY_ILF_LUMBER_COST_NDT2,
    ABILITY_ILF_DETECTION_TYPE_NDT3,
    ABILITY_ILF_STACKING_TYPE_POI4,
    ABILITY_ILF_STACKING_TYPE_POA5,
    ABILITY_ILF_MAXIMUM_CREEP_LEVEL_PLY1,
    ABILITY_ILF_MAXIMUM_CREEP_LEVEL_POS1,
    ABILITY_ILF_MOVEMENT_UPDATE_FREQUENCY_PRG1,
    ABILITY_ILF_ATTACK_UPDATE_FREQUENCY_PRG2,
    ABILITY_ILF_MANA_LOSS_PRG6,
    ABILITY_ILF_UNITS_SUMMONED_TYPE_ONE,
    ABILITY_ILF_UNITS_SUMMONED_TYPE_TWO,
    ABILITY_ILF_MAX_UNITS_SUMMONED,
    ABILITY_ILF_ALLOW_WHEN_FULL_REJ3,
    ABILITY_ILF_MAXIMUM_UNITS_CHARGED_TO_CASTER,
    ABILITY_ILF_MAXIMUM_UNITS_AFFECTED,
    ABILITY_ILF_DEFENSE_INCREASE_ROA2,
    ABILITY_ILF_MAX_UNITS_ROA7,
    ABILITY_ILF_ROOTED_WEAPONS,
    ABILITY_ILF_UPROOTED_WEAPONS,
    ABILITY_ILF_UPROOTED_DEFENSE_TYPE,
    ABILITY_ILF_ACCUMULATION_STEP,
    ABILITY_ILF_NUMBER_OF_OWLS,
    ABILITY_ILF_STACKING_TYPE_SPO4,
    ABILITY_ILF_NUMBER_OF_UNITS,
    ABILITY_ILF_SPIDER_CAPACITY,
    ABILITY_ILF_INTERVALS_BEFORE_CHANGING_TREES,
    ABILITY_ILF_AGILITY_BONUS,
    ABILITY_ILF_INTELLIGENCE_BONUS,
    ABILITY_ILF_STRENGTH_BONUS_ISTR,
    ABILITY_ILF_ATTACK_BONUS,
    ABILITY_ILF_DEFENSE_BONUS_IDEF,
    ABILITY_ILF_SUMMON_1_AMOUNT,
    ABILITY_ILF_SUMMON_2_AMOUNT,
    ABILITY_ILF_EXPERIENCE_GAINED,
    ABILITY_ILF_HIT_POINTS_GAINED_IHPG,
    ABILITY_ILF_MANA_POINTS_GAINED_IMPG,
    ABILITY_ILF_HIT_POINTS_GAINED_IHP2,
    ABILITY_ILF_MANA_POINTS_GAINED_IMP2,
    ABILITY_ILF_DAMAGE_BONUS_DICE,
    ABILITY_ILF_ARMOR_PENALTY_IARP,
    ABILITY_ILF_ENABLED_ATTACK_INDEX_IOB5,
    ABILITY_ILF_LEVELS_GAINED,
    ABILITY_ILF_MAX_LIFE_GAINED,
    ABILITY_ILF_MAX_MANA_GAINED,
    ABILITY_ILF_GOLD_GIVEN,
    ABILITY_ILF_LUMBER_GIVEN,
    ABILITY_ILF_DETECTION_TYPE_IFA1,
    ABILITY_ILF_MAXIMUM_CREEP_LEVEL_ICRE,
    ABILITY_ILF_MOVEMENT_SPEED_BONUS,
    ABILITY_ILF_HIT_POINTS_REGENERATED_PER_SECOND,
    ABILITY_ILF_SIGHT_RANGE_BONUS,
    ABILITY_ILF_DAMAGE_PER_DURATION,
    ABILITY_ILF_MANA_USED_PER_SECOND,
    ABILITY_ILF_EXTRA_MANA_REQUIRED,
    ABILITY_ILF_DETECTION_RADIUS_IDET,
    ABILITY_ILF_MANA_LOSS_PER_UNIT_IDIM,
    ABILITY_ILF_DAMAGE_TO_SUMMONED_UNITS_IDID,
    ABILITY_ILF_MAXIMUM_NUMBER_OF_UNITS_IREC,
    ABILITY_ILF_DELAY_AFTER_DEATH_SECONDS,
    ABILITY_ILF_RESTORED_LIFE,
    ABILITY_ILF_RESTORED_MANA__1_FOR_CURRENT,
    ABILITY_ILF_HIT_POINTS_RESTORED,
    ABILITY_ILF_MANA_POINTS_RESTORED,
    ABILITY_ILF_MAXIMUM_NUMBER_OF_UNITS_ITPM,
    ABILITY_ILF_NUMBER_OF_CORPSES_RAISED_CAD1,
    ABILITY_ILF_TERRAIN_DEFORMATION_DURATION_MS,
    ABILITY_ILF_MAXIMUM_UNITS,
    ABILITY_ILF_DETECTION_TYPE_DET1,
    ABILITY_ILF_GOLD_COST_PER_STRUCTURE,
    ABILITY_ILF_LUMBER_COST_PER_USE,
    ABILITY_ILF_DETECTION_TYPE_NSP3,
    ABILITY_ILF_NUMBER_OF_SWARM_UNITS,
    ABILITY_ILF_MAX_SWARM_UNITS_PER_TARGET,
    ABILITY_ILF_NUMBER_OF_SUMMONED_UNITS_NBA2,
    ABILITY_ILF_MAXIMUM_CREEP_LEVEL_NCH1,
    ABILITY_ILF_ATTACKS_PREVENTED,
    ABILITY_ILF_MAXIMUM_NUMBER_OF_TARGETS_EFK3,
    ABILITY_ILF_NUMBER_OF_SUMMONED_UNITS_ESV1,
    ABILITY_ILF_MAXIMUM_NUMBER_OF_CORPSES_EXH1,
    ABILITY_ILF_ITEM_CAPACITY,
    ABILITY_ILF_MAXIMUM_NUMBER_OF_TARGETS_SPL2,
    ABILITY_ILF_ALLOW_WHEN_FULL_IRL3,
    ABILITY_ILF_MAXIMUM_DISPELLED_UNITS,
    ABILITY_ILF_NUMBER_OF_LURES,
    ABILITY_ILF_NEW_TIME_OF_DAY_HOUR,
    ABILITY_ILF_NEW_TIME_OF_DAY_MINUTE,
    ABILITY_ILF_NUMBER_OF_UNITS_CREATED_MEC1,
    ABILITY_ILF_MINIMUM_SPELLS,
    ABILITY_ILF_MAXIMUM_SPELLS,
    ABILITY_ILF_DISABLED_ATTACK_INDEX,
    ABILITY_ILF_ENABLED_ATTACK_INDEX_GRA4,
    ABILITY_ILF_MAXIMUM_ATTACKS,
    ABILITY_ILF_BUILDING_TYPES_ALLOWED_NPR1,
    ABILITY_ILF_BUILDING_TYPES_ALLOWED_NSA1,
    ABILITY_ILF_ATTACK_MODIFICATION,
    ABILITY_ILF_SUMMONED_UNIT_COUNT_NPA5,
    ABILITY_ILF_UPGRADE_LEVELS,
    ABILITY_ILF_NUMBER_OF_SUMMONED_UNITS_NDO2,
    ABILITY_ILF_BEASTS_PER_SECOND,
    ABILITY_ILF_TARGET_TYPE,
    ABILITY_ILF_OPTIONS,
    ABILITY_ILF_ARMOR_PENALTY_NAB3,
    ABILITY_ILF_WAVE_COUNT_NHS6,
    ABILITY_ILF_MAX_CREEP_LEVEL_NTM3,
    ABILITY_ILF_MISSILE_COUNT,
    ABILITY_ILF_SPLIT_ATTACK_COUNT,
    ABILITY_ILF_GENERATION_COUNT,
    ABILITY_ILF_ROCK_RING_COUNT,
    ABILITY_ILF_WAVE_COUNT_NVC2,
    ABILITY_ILF_PREFER_HOSTILES_TAU1,
    ABILITY_ILF_PREFER_FRIENDLIES_TAU2,
    ABILITY_ILF_MAX_UNITS_TAU3,
    ABILITY_ILF_NUMBER_OF_PULSES,
    ABILITY_ILF_SUMMONED_UNIT_TYPE_HWE1,
    ABILITY_ILF_SUMMONED_UNIT_UIN4,
    ABILITY_ILF_SUMMONED_UNIT_OSF1,
    ABILITY_ILF_SUMMONED_UNIT_TYPE_EFNU,
    ABILITY_ILF_SUMMONED_UNIT_TYPE_NBAU,
    ABILITY_ILF_SUMMONED_UNIT_TYPE_NTOU,
    ABILITY_ILF_SUMMONED_UNIT_TYPE_ESVU,
    ABILITY_ILF_SUMMONED_UNIT_TYPES,
    ABILITY_ILF_SUMMONED_UNIT_TYPE_NDOU,
    ABILITY_ILF_ALTERNATE_FORM_UNIT_EMEU,
    ABILITY_ILF_PLAGUE_WARD_UNIT_TYPE,
    ABILITY_ILF_ALLOWED_UNIT_TYPE_BTL1,
    ABILITY_ILF_NEW_UNIT_TYPE,
    ABILITY_ILF_RESULTING_UNIT_TYPE_ENT1,
    ABILITY_ILF_CORPSE_UNIT_TYPE,
    ABILITY_ILF_ALLOWED_UNIT_TYPE_LOA1,
    ABILITY_ILF_UNIT_TYPE_FOR_LIMIT_CHECK,
    ABILITY_ILF_WARD_UNIT_TYPE_STAU,
    ABILITY_ILF_EFFECT_ABILITY,
    ABILITY_ILF_CONVERSION_UNIT,
    ABILITY_ILF_UNIT_TO_PRESERVE,
    ABILITY_ILF_UNIT_TYPE_ALLOWED,
    ABILITY_ILF_SWARM_UNIT_TYPE,
    ABILITY_ILF_RESULTING_UNIT_TYPE_COAU,
    ABILITY_ILF_UNIT_TYPE_EXHU,
    ABILITY_ILF_WARD_UNIT_TYPE_HWDU,
    ABILITY_ILF_LURE_UNIT_TYPE,
    ABILITY_ILF_UNIT_TYPE_IPMU,
    ABILITY_ILF_FACTORY_UNIT_ID,
    ABILITY_ILF_SPAWN_UNIT_ID_NFYU,
    ABILITY_ILF_DESTRUCTIBLE_ID,
    ABILITY_ILF_UPGRADE_TYPE,
}

declare enum AbilityRealLevelField {
    ABILITY_RLF_CASTING_TIME,
    ABILITY_RLF_DURATION_NORMAL,
    ABILITY_RLF_DURATION_HERO,
    ABILITY_RLF_COOLDOWN,
    ABILITY_RLF_AREA_OF_EFFECT,
    ABILITY_RLF_CAST_RANGE,
    ABILITY_RLF_DAMAGE_HBZ2,
    ABILITY_RLF_BUILDING_REDUCTION_HBZ4,
    ABILITY_RLF_DAMAGE_PER_SECOND_HBZ5,
    ABILITY_RLF_MAXIMUM_DAMAGE_PER_WAVE,
    ABILITY_RLF_MANA_REGENERATION_INCREASE,
    ABILITY_RLF_CASTING_DELAY,
    ABILITY_RLF_DAMAGE_PER_SECOND_OWW1,
    ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_OWW2,
    ABILITY_RLF_CHANCE_TO_CRITICAL_STRIKE,
    ABILITY_RLF_DAMAGE_MULTIPLIER_OCR2,
    ABILITY_RLF_DAMAGE_BONUS_OCR3,
    ABILITY_RLF_CHANCE_TO_EVADE_OCR4,
    ABILITY_RLF_DAMAGE_DEALT_PERCENT_OMI2,
    ABILITY_RLF_DAMAGE_TAKEN_PERCENT_OMI3,
    ABILITY_RLF_ANIMATION_DELAY,
    ABILITY_RLF_TRANSITION_TIME,
    ABILITY_RLF_MOVEMENT_SPEED_INCREASE_PERCENT_OWK2,
    ABILITY_RLF_BACKSTAB_DAMAGE,
    ABILITY_RLF_AMOUNT_HEALED_DAMAGED_UDC1,
    ABILITY_RLF_LIFE_CONVERTED_TO_MANA,
    ABILITY_RLF_LIFE_CONVERTED_TO_LIFE,
    ABILITY_RLF_MOVEMENT_SPEED_INCREASE_PERCENT_UAU1,
    ABILITY_RLF_LIFE_REGENERATION_INCREASE_PERCENT,
    ABILITY_RLF_CHANCE_TO_EVADE_EEV1,
    ABILITY_RLF_DAMAGE_PER_INTERVAL,
    ABILITY_RLF_MANA_DRAINED_PER_SECOND_EIM2,
    ABILITY_RLF_BUFFER_MANA_REQUIRED,
    ABILITY_RLF_MAX_MANA_DRAINED,
    ABILITY_RLF_BOLT_DELAY,
    ABILITY_RLF_BOLT_LIFETIME,
    ABILITY_RLF_ALTITUDE_ADJUSTMENT_DURATION,
    ABILITY_RLF_LANDING_DELAY_TIME,
    ABILITY_RLF_ALTERNATE_FORM_HIT_POINT_BONUS,
    ABILITY_RLF_MOVE_SPEED_BONUS_INFO_PANEL_ONLY,
    ABILITY_RLF_ATTACK_SPEED_BONUS_INFO_PANEL_ONLY,
    ABILITY_RLF_LIFE_REGENERATION_RATE_PER_SECOND,
    ABILITY_RLF_STUN_DURATION_USL1,
    ABILITY_RLF_ATTACK_DAMAGE_STOLEN_PERCENT,
    ABILITY_RLF_DAMAGE_UCS1,
    ABILITY_RLF_MAX_DAMAGE_UCS2,
    ABILITY_RLF_DISTANCE_UCS3,
    ABILITY_RLF_FINAL_AREA_UCS4,
    ABILITY_RLF_DAMAGE_UIN1,
    ABILITY_RLF_DURATION,
    ABILITY_RLF_IMPACT_DELAY,
    ABILITY_RLF_DAMAGE_PER_TARGET_OCL1,
    ABILITY_RLF_DAMAGE_REDUCTION_PER_TARGET,
    ABILITY_RLF_EFFECT_DELAY_OEQ1,
    ABILITY_RLF_DAMAGE_PER_SECOND_TO_BUILDINGS,
    ABILITY_RLF_UNITS_SLOWED_PERCENT,
    ABILITY_RLF_FINAL_AREA_OEQ4,
    ABILITY_RLF_DAMAGE_PER_SECOND_EER1,
    ABILITY_RLF_DAMAGE_DEALT_TO_ATTACKERS,
    ABILITY_RLF_LIFE_HEALED,
    ABILITY_RLF_HEAL_INTERVAL,
    ABILITY_RLF_BUILDING_REDUCTION_ETQ3,
    ABILITY_RLF_INITIAL_IMMUNITY_DURATION,
    ABILITY_RLF_MAX_LIFE_DRAINED_PER_SECOND_PERCENT,
    ABILITY_RLF_BUILDING_REDUCTION_UDD2,
    ABILITY_RLF_ARMOR_DURATION,
    ABILITY_RLF_ARMOR_BONUS_UFA2,
    ABILITY_RLF_AREA_OF_EFFECT_DAMAGE,
    ABILITY_RLF_SPECIFIC_TARGET_DAMAGE_UFN2,
    ABILITY_RLF_DAMAGE_BONUS_HFA1,
    ABILITY_RLF_DAMAGE_DEALT_ESF1,
    ABILITY_RLF_DAMAGE_INTERVAL_ESF2,
    ABILITY_RLF_BUILDING_REDUCTION_ESF3,
    ABILITY_RLF_DAMAGE_BONUS_PERCENT,
    ABILITY_RLF_DEFENSE_BONUS_HAV1,
    ABILITY_RLF_HIT_POINT_BONUS,
    ABILITY_RLF_DAMAGE_BONUS_HAV3,
    ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_HAV4,
    ABILITY_RLF_CHANCE_TO_BASH,
    ABILITY_RLF_DAMAGE_MULTIPLIER_HBH2,
    ABILITY_RLF_DAMAGE_BONUS_HBH3,
    ABILITY_RLF_CHANCE_TO_MISS_HBH4,
    ABILITY_RLF_DAMAGE_HTB1,
    ABILITY_RLF_AOE_DAMAGE,
    ABILITY_RLF_SPECIFIC_TARGET_DAMAGE_HTC2,
    ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_PERCENT_HTC3,
    ABILITY_RLF_ATTACK_SPEED_REDUCTION_PERCENT_HTC4,
    ABILITY_RLF_ARMOR_BONUS_HAD1,
    ABILITY_RLF_AMOUNT_HEALED_DAMAGED_HHB1,
    ABILITY_RLF_EXTRA_DAMAGE_HCA1,
    ABILITY_RLF_MOVEMENT_SPEED_FACTOR_HCA2,
    ABILITY_RLF_ATTACK_SPEED_FACTOR_HCA3,
    ABILITY_RLF_MOVEMENT_SPEED_INCREASE_PERCENT_OAE1,
    ABILITY_RLF_ATTACK_SPEED_INCREASE_PERCENT_OAE2,
    ABILITY_RLF_REINCARNATION_DELAY,
    ABILITY_RLF_DAMAGE_OSH1,
    ABILITY_RLF_MAXIMUM_DAMAGE_OSH2,
    ABILITY_RLF_DISTANCE_OSH3,
    ABILITY_RLF_FINAL_AREA_OSH4,
    ABILITY_RLF_GRAPHIC_DELAY_NFD1,
    ABILITY_RLF_GRAPHIC_DURATION_NFD2,
    ABILITY_RLF_DAMAGE_NFD3,
    ABILITY_RLF_SUMMONED_UNIT_DAMAGE_AMS1,
    ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_AMS2,
    ABILITY_RLF_AURA_DURATION,
    ABILITY_RLF_DAMAGE_PER_SECOND_APL2,
    ABILITY_RLF_DURATION_OF_PLAGUE_WARD,
    ABILITY_RLF_AMOUNT_OF_HIT_POINTS_REGENERATED,
    ABILITY_RLF_ATTACK_DAMAGE_INCREASE_AKB1,
    ABILITY_RLF_MANA_LOSS_ADM1,
    ABILITY_RLF_SUMMONED_UNIT_DAMAGE_ADM2,
    ABILITY_RLF_EXPANSION_AMOUNT,
    ABILITY_RLF_INTERVAL_DURATION_BGM2,
    ABILITY_RLF_RADIUS_OF_MINING_RING,
    ABILITY_RLF_ATTACK_SPEED_INCREASE_PERCENT_BLO1,
    ABILITY_RLF_MOVEMENT_SPEED_INCREASE_PERCENT_BLO2,
    ABILITY_RLF_SCALING_FACTOR,
    ABILITY_RLF_HIT_POINTS_PER_SECOND_CAN1,
    ABILITY_RLF_MAX_HIT_POINTS,
    ABILITY_RLF_DAMAGE_PER_SECOND_DEV2,
    ABILITY_RLF_MOVEMENT_UPDATE_FREQUENCY_CHD1,
    ABILITY_RLF_ATTACK_UPDATE_FREQUENCY_CHD2,
    ABILITY_RLF_SUMMONED_UNIT_DAMAGE_CHD3,
    ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_PERCENT_CRI1,
    ABILITY_RLF_ATTACK_SPEED_REDUCTION_PERCENT_CRI2,
    ABILITY_RLF_DAMAGE_REDUCTION_CRI3,
    ABILITY_RLF_CHANCE_TO_MISS_CRS,
    ABILITY_RLF_FULL_DAMAGE_RADIUS_DDA1,
    ABILITY_RLF_FULL_DAMAGE_AMOUNT_DDA2,
    ABILITY_RLF_PARTIAL_DAMAGE_RADIUS,
    ABILITY_RLF_PARTIAL_DAMAGE_AMOUNT,
    ABILITY_RLF_BUILDING_DAMAGE_FACTOR_SDS1,
    ABILITY_RLF_MAX_DAMAGE_UCO5,
    ABILITY_RLF_MOVE_SPEED_BONUS_UCO6,
    ABILITY_RLF_DAMAGE_TAKEN_PERCENT_DEF1,
    ABILITY_RLF_DAMAGE_DEALT_PERCENT_DEF2,
    ABILITY_RLF_MOVEMENT_SPEED_FACTOR_DEF3,
    ABILITY_RLF_ATTACK_SPEED_FACTOR_DEF4,
    ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_DEF5,
    ABILITY_RLF_CHANCE_TO_DEFLECT,
    ABILITY_RLF_DEFLECT_DAMAGE_TAKEN_PIERCING,
    ABILITY_RLF_DEFLECT_DAMAGE_TAKEN_SPELLS,
    ABILITY_RLF_RIP_DELAY,
    ABILITY_RLF_EAT_DELAY,
    ABILITY_RLF_HIT_POINTS_GAINED_EAT3,
    ABILITY_RLF_AIR_UNIT_LOWER_DURATION,
    ABILITY_RLF_AIR_UNIT_HEIGHT,
    ABILITY_RLF_MELEE_ATTACK_RANGE,
    ABILITY_RLF_INTERVAL_DURATION_EGM2,
    ABILITY_RLF_EFFECT_DELAY_FLA2,
    ABILITY_RLF_MINING_DURATION,
    ABILITY_RLF_RADIUS_OF_GRAVESTONES,
    ABILITY_RLF_RADIUS_OF_CORPSES,
    ABILITY_RLF_HIT_POINTS_GAINED_HEA1,
    ABILITY_RLF_DAMAGE_INCREASE_PERCENT_INF1,
    ABILITY_RLF_AUTOCAST_RANGE,
    ABILITY_RLF_LIFE_REGEN_RATE,
    ABILITY_RLF_GRAPHIC_DELAY_LIT1,
    ABILITY_RLF_GRAPHIC_DURATION_LIT2,
    ABILITY_RLF_DAMAGE_PER_SECOND_LSH1,
    ABILITY_RLF_MANA_GAINED,
    ABILITY_RLF_HIT_POINTS_GAINED_MBT2,
    ABILITY_RLF_AUTOCAST_REQUIREMENT,
    ABILITY_RLF_WATER_HEIGHT,
    ABILITY_RLF_ACTIVATION_DELAY_MIN1,
    ABILITY_RLF_INVISIBILITY_TRANSITION_TIME,
    ABILITY_RLF_ACTIVATION_RADIUS,
    ABILITY_RLF_AMOUNT_REGENERATED,
    ABILITY_RLF_DAMAGE_PER_SECOND_POI1,
    ABILITY_RLF_ATTACK_SPEED_FACTOR_POI2,
    ABILITY_RLF_MOVEMENT_SPEED_FACTOR_POI3,
    ABILITY_RLF_EXTRA_DAMAGE_POA1,
    ABILITY_RLF_DAMAGE_PER_SECOND_POA2,
    ABILITY_RLF_ATTACK_SPEED_FACTOR_POA3,
    ABILITY_RLF_MOVEMENT_SPEED_FACTOR_POA4,
    ABILITY_RLF_DAMAGE_AMPLIFICATION,
    ABILITY_RLF_CHANCE_TO_STOMP_PERCENT,
    ABILITY_RLF_DAMAGE_DEALT_WAR2,
    ABILITY_RLF_FULL_DAMAGE_RADIUS_WAR3,
    ABILITY_RLF_HALF_DAMAGE_RADIUS_WAR4,
    ABILITY_RLF_SUMMONED_UNIT_DAMAGE_PRG3,
    ABILITY_RLF_UNIT_PAUSE_DURATION,
    ABILITY_RLF_HERO_PAUSE_DURATION,
    ABILITY_RLF_HIT_POINTS_GAINED_REJ1,
    ABILITY_RLF_MANA_POINTS_GAINED_REJ2,
    ABILITY_RLF_MINIMUM_LIFE_REQUIRED,
    ABILITY_RLF_MINIMUM_MANA_REQUIRED,
    ABILITY_RLF_REPAIR_COST_RATIO,
    ABILITY_RLF_REPAIR_TIME_RATIO,
    ABILITY_RLF_POWERBUILD_COST,
    ABILITY_RLF_POWERBUILD_RATE,
    ABILITY_RLF_NAVAL_RANGE_BONUS,
    ABILITY_RLF_DAMAGE_INCREASE_PERCENT_ROA1,
    ABILITY_RLF_LIFE_REGENERATION_RATE,
    ABILITY_RLF_MANA_REGEN,
    ABILITY_RLF_DAMAGE_INCREASE,
    ABILITY_RLF_SALVAGE_COST_RATIO,
    ABILITY_RLF_IN_FLIGHT_SIGHT_RADIUS,
    ABILITY_RLF_HOVERING_SIGHT_RADIUS,
    ABILITY_RLF_HOVERING_HEIGHT,
    ABILITY_RLF_DURATION_OF_OWLS,
    ABILITY_RLF_FADE_DURATION,
    ABILITY_RLF_DAY_NIGHT_DURATION,
    ABILITY_RLF_ACTION_DURATION,
    ABILITY_RLF_MOVEMENT_SPEED_FACTOR_SLO1,
    ABILITY_RLF_ATTACK_SPEED_FACTOR_SLO2,
    ABILITY_RLF_DAMAGE_PER_SECOND_SPO1,
    ABILITY_RLF_MOVEMENT_SPEED_FACTOR_SPO2,
    ABILITY_RLF_ATTACK_SPEED_FACTOR_SPO3,
    ABILITY_RLF_ACTIVATION_DELAY_STA1,
    ABILITY_RLF_DETECTION_RADIUS_STA2,
    ABILITY_RLF_DETONATION_RADIUS,
    ABILITY_RLF_STUN_DURATION_STA4,
    ABILITY_RLF_ATTACK_SPEED_BONUS_PERCENT,
    ABILITY_RLF_DAMAGE_PER_SECOND_UHF2,
    ABILITY_RLF_LUMBER_PER_INTERVAL,
    ABILITY_RLF_ART_ATTACHMENT_HEIGHT,
    ABILITY_RLF_TELEPORT_AREA_WIDTH,
    ABILITY_RLF_TELEPORT_AREA_HEIGHT,
    ABILITY_RLF_LIFE_STOLEN_PER_ATTACK,
    ABILITY_RLF_DAMAGE_BONUS_IDAM,
    ABILITY_RLF_CHANCE_TO_HIT_UNITS_PERCENT,
    ABILITY_RLF_CHANCE_TO_HIT_HEROS_PERCENT,
    ABILITY_RLF_CHANCE_TO_HIT_SUMMONS_PERCENT,
    ABILITY_RLF_DELAY_FOR_TARGET_EFFECT,
    ABILITY_RLF_DAMAGE_DEALT_PERCENT_OF_NORMAL,
    ABILITY_RLF_DAMAGE_RECEIVED_MULTIPLIER,
    ABILITY_RLF_MANA_REGENERATION_BONUS_AS_FRACTION_OF_NORMAL,
    ABILITY_RLF_MOVEMENT_SPEED_INCREASE_ISPI,
    ABILITY_RLF_DAMAGE_PER_SECOND_IDPS,
    ABILITY_RLF_ATTACK_DAMAGE_INCREASE_CAC1,
    ABILITY_RLF_DAMAGE_PER_SECOND_COR1,
    ABILITY_RLF_ATTACK_SPEED_INCREASE_ISX1,
    ABILITY_RLF_DAMAGE_WRS1,
    ABILITY_RLF_TERRAIN_DEFORMATION_AMPLITUDE,
    ABILITY_RLF_DAMAGE_CTC1,
    ABILITY_RLF_EXTRA_DAMAGE_TO_TARGET,
    ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_CTC3,
    ABILITY_RLF_ATTACK_SPEED_REDUCTION_CTC4,
    ABILITY_RLF_DAMAGE_CTB1,
    ABILITY_RLF_CASTING_DELAY_SECONDS,
    ABILITY_RLF_MANA_LOSS_PER_UNIT_DTN1,
    ABILITY_RLF_DAMAGE_TO_SUMMONED_UNITS_DTN2,
    ABILITY_RLF_TRANSITION_TIME_SECONDS,
    ABILITY_RLF_MANA_DRAINED_PER_SECOND_NMR1,
    ABILITY_RLF_CHANCE_TO_REDUCE_DAMAGE_PERCENT,
    ABILITY_RLF_MINIMUM_DAMAGE,
    ABILITY_RLF_IGNORED_DAMAGE,
    ABILITY_RLF_FULL_DAMAGE_DEALT,
    ABILITY_RLF_FULL_DAMAGE_INTERVAL,
    ABILITY_RLF_HALF_DAMAGE_DEALT,
    ABILITY_RLF_HALF_DAMAGE_INTERVAL,
    ABILITY_RLF_BUILDING_REDUCTION_HFS5,
    ABILITY_RLF_MAXIMUM_DAMAGE_HFS6,
    ABILITY_RLF_MANA_PER_HIT_POINT,
    ABILITY_RLF_DAMAGE_ABSORBED_PERCENT,
    ABILITY_RLF_WAVE_DISTANCE,
    ABILITY_RLF_WAVE_TIME_SECONDS,
    ABILITY_RLF_DAMAGE_DEALT_UIM3,
    ABILITY_RLF_AIR_TIME_SECONDS_UIM4,
    ABILITY_RLF_UNIT_RELEASE_INTERVAL_SECONDS,
    ABILITY_RLF_DAMAGE_RETURN_FACTOR,
    ABILITY_RLF_DAMAGE_RETURN_THRESHOLD,
    ABILITY_RLF_RETURNED_DAMAGE_FACTOR,
    ABILITY_RLF_RECEIVED_DAMAGE_FACTOR,
    ABILITY_RLF_DEFENSE_BONUS_UTS3,
    ABILITY_RLF_DAMAGE_BONUS_NBA1,
    ABILITY_RLF_SUMMONED_UNIT_DURATION_SECONDS_NBA3,
    ABILITY_RLF_MANA_PER_SUMMONED_HITPOINT,
    ABILITY_RLF_CHARGE_FOR_CURRENT_LIFE,
    ABILITY_RLF_HIT_POINTS_DRAINED,
    ABILITY_RLF_MANA_POINTS_DRAINED,
    ABILITY_RLF_DRAIN_INTERVAL_SECONDS,
    ABILITY_RLF_LIFE_TRANSFERRED_PER_SECOND,
    ABILITY_RLF_MANA_TRANSFERRED_PER_SECOND,
    ABILITY_RLF_BONUS_LIFE_FACTOR,
    ABILITY_RLF_BONUS_LIFE_DECAY,
    ABILITY_RLF_BONUS_MANA_FACTOR,
    ABILITY_RLF_BONUS_MANA_DECAY,
    ABILITY_RLF_CHANCE_TO_MISS_PERCENT,
    ABILITY_RLF_MOVEMENT_SPEED_MODIFIER,
    ABILITY_RLF_ATTACK_SPEED_MODIFIER,
    ABILITY_RLF_DAMAGE_PER_SECOND_TDG1,
    ABILITY_RLF_MEDIUM_DAMAGE_RADIUS_TDG2,
    ABILITY_RLF_MEDIUM_DAMAGE_PER_SECOND,
    ABILITY_RLF_SMALL_DAMAGE_RADIUS_TDG4,
    ABILITY_RLF_SMALL_DAMAGE_PER_SECOND,
    ABILITY_RLF_AIR_TIME_SECONDS_TSP1,
    ABILITY_RLF_MINIMUM_HIT_INTERVAL_SECONDS,
    ABILITY_RLF_DAMAGE_PER_SECOND_NBF5,
    ABILITY_RLF_MAXIMUM_RANGE,
    ABILITY_RLF_MINIMUM_RANGE,
    ABILITY_RLF_DAMAGE_PER_TARGET_EFK1,
    ABILITY_RLF_MAXIMUM_TOTAL_DAMAGE,
    ABILITY_RLF_MAXIMUM_SPEED_ADJUSTMENT,
    ABILITY_RLF_DECAYING_DAMAGE,
    ABILITY_RLF_MOVEMENT_SPEED_FACTOR_ESH2,
    ABILITY_RLF_ATTACK_SPEED_FACTOR_ESH3,
    ABILITY_RLF_DECAY_POWER,
    ABILITY_RLF_INITIAL_DAMAGE_ESH5,
    ABILITY_RLF_MAXIMUM_LIFE_ABSORBED,
    ABILITY_RLF_MAXIMUM_MANA_ABSORBED,
    ABILITY_RLF_MOVEMENT_SPEED_INCREASE_BSK1,
    ABILITY_RLF_ATTACK_SPEED_INCREASE_BSK2,
    ABILITY_RLF_DAMAGE_TAKEN_INCREASE,
    ABILITY_RLF_LIFE_PER_UNIT,
    ABILITY_RLF_MANA_PER_UNIT,
    ABILITY_RLF_LIFE_PER_BUFF,
    ABILITY_RLF_MANA_PER_BUFF,
    ABILITY_RLF_SUMMONED_UNIT_DAMAGE_DVM5,
    ABILITY_RLF_DAMAGE_BONUS_FAK1,
    ABILITY_RLF_MEDIUM_DAMAGE_FACTOR_FAK2,
    ABILITY_RLF_SMALL_DAMAGE_FACTOR_FAK3,
    ABILITY_RLF_FULL_DAMAGE_RADIUS_FAK4,
    ABILITY_RLF_HALF_DAMAGE_RADIUS_FAK5,
    ABILITY_RLF_EXTRA_DAMAGE_PER_SECOND,
    ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_LIQ2,
    ABILITY_RLF_ATTACK_SPEED_REDUCTION_LIQ3,
    ABILITY_RLF_MAGIC_DAMAGE_FACTOR,
    ABILITY_RLF_UNIT_DAMAGE_PER_MANA_POINT,
    ABILITY_RLF_HERO_DAMAGE_PER_MANA_POINT,
    ABILITY_RLF_UNIT_MAXIMUM_DAMAGE,
    ABILITY_RLF_HERO_MAXIMUM_DAMAGE,
    ABILITY_RLF_DAMAGE_COOLDOWN,
    ABILITY_RLF_DISTRIBUTED_DAMAGE_FACTOR_SPL1,
    ABILITY_RLF_LIFE_REGENERATED,
    ABILITY_RLF_MANA_REGENERATED,
    ABILITY_RLF_MANA_LOSS_PER_UNIT_IDC1,
    ABILITY_RLF_SUMMONED_UNIT_DAMAGE_IDC2,
    ABILITY_RLF_ACTIVATION_DELAY_IMO2,
    ABILITY_RLF_LURE_INTERVAL_SECONDS,
    ABILITY_RLF_DAMAGE_BONUS_ISR1,
    ABILITY_RLF_DAMAGE_REDUCTION_ISR2,
    ABILITY_RLF_DAMAGE_BONUS_IPV1,
    ABILITY_RLF_LIFE_STEAL_AMOUNT,
    ABILITY_RLF_LIFE_RESTORED_FACTOR,
    ABILITY_RLF_MANA_RESTORED_FACTOR,
    ABILITY_RLF_ATTACH_DELAY,
    ABILITY_RLF_REMOVE_DELAY,
    ABILITY_RLF_HERO_REGENERATION_DELAY,
    ABILITY_RLF_UNIT_REGENERATION_DELAY,
    ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_NSA4,
    ABILITY_RLF_HIT_POINTS_PER_SECOND_NSA5,
    ABILITY_RLF_DAMAGE_TO_SUMMONED_UNITS_IXS1,
    ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_IXS2,
    ABILITY_RLF_SUMMONED_UNIT_DURATION,
    ABILITY_RLF_SHIELD_COOLDOWN_TIME,
    ABILITY_RLF_DAMAGE_PER_SECOND_NDO1,
    ABILITY_RLF_SUMMONED_UNIT_DURATION_SECONDS_NDO3,
    ABILITY_RLF_MEDIUM_DAMAGE_RADIUS_FLK1,
    ABILITY_RLF_SMALL_DAMAGE_RADIUS_FLK2,
    ABILITY_RLF_FULL_DAMAGE_AMOUNT_FLK3,
    ABILITY_RLF_MEDIUM_DAMAGE_AMOUNT,
    ABILITY_RLF_SMALL_DAMAGE_AMOUNT,
    ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_PERCENT_HBN1,
    ABILITY_RLF_ATTACK_SPEED_REDUCTION_PERCENT_HBN2,
    ABILITY_RLF_MAX_MANA_DRAINED_UNITS,
    ABILITY_RLF_DAMAGE_RATIO_UNITS_PERCENT,
    ABILITY_RLF_MAX_MANA_DRAINED_HEROS,
    ABILITY_RLF_DAMAGE_RATIO_HEROS_PERCENT,
    ABILITY_RLF_SUMMONED_DAMAGE,
    ABILITY_RLF_DISTRIBUTED_DAMAGE_FACTOR_NCA1,
    ABILITY_RLF_INITIAL_DAMAGE_PXF1,
    ABILITY_RLF_DAMAGE_PER_SECOND_PXF2,
    ABILITY_RLF_DAMAGE_PER_SECOND_MLS1,
    ABILITY_RLF_BEAST_COLLISION_RADIUS,
    ABILITY_RLF_DAMAGE_AMOUNT_NST3,
    ABILITY_RLF_DAMAGE_RADIUS,
    ABILITY_RLF_DAMAGE_DELAY,
    ABILITY_RLF_FOLLOW_THROUGH_TIME,
    ABILITY_RLF_ART_DURATION,
    ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_PERCENT_NAB1,
    ABILITY_RLF_ATTACK_SPEED_REDUCTION_PERCENT_NAB2,
    ABILITY_RLF_PRIMARY_DAMAGE,
    ABILITY_RLF_SECONDARY_DAMAGE,
    ABILITY_RLF_DAMAGE_INTERVAL_NAB6,
    ABILITY_RLF_GOLD_COST_FACTOR,
    ABILITY_RLF_LUMBER_COST_FACTOR,
    ABILITY_RLF_MOVE_SPEED_BONUS_NEG1,
    ABILITY_RLF_DAMAGE_BONUS_NEG2,
    ABILITY_RLF_DAMAGE_AMOUNT_NCS1,
    ABILITY_RLF_DAMAGE_INTERVAL_NCS2,
    ABILITY_RLF_MAX_DAMAGE_NCS4,
    ABILITY_RLF_BUILDING_DAMAGE_FACTOR_NCS5,
    ABILITY_RLF_EFFECT_DURATION,
    ABILITY_RLF_SPAWN_INTERVAL_NSY1,
    ABILITY_RLF_SPAWN_UNIT_DURATION,
    ABILITY_RLF_SPAWN_UNIT_OFFSET,
    ABILITY_RLF_LEASH_RANGE_NSY5,
    ABILITY_RLF_SPAWN_INTERVAL_NFY1,
    ABILITY_RLF_LEASH_RANGE_NFY2,
    ABILITY_RLF_CHANCE_TO_DEMOLISH,
    ABILITY_RLF_DAMAGE_MULTIPLIER_BUILDINGS,
    ABILITY_RLF_DAMAGE_MULTIPLIER_UNITS,
    ABILITY_RLF_DAMAGE_MULTIPLIER_HEROES,
    ABILITY_RLF_BONUS_DAMAGE_MULTIPLIER,
    ABILITY_RLF_DEATH_DAMAGE_FULL_AMOUNT,
    ABILITY_RLF_DEATH_DAMAGE_FULL_AREA,
    ABILITY_RLF_DEATH_DAMAGE_HALF_AMOUNT,
    ABILITY_RLF_DEATH_DAMAGE_HALF_AREA,
    ABILITY_RLF_DEATH_DAMAGE_DELAY,
    ABILITY_RLF_DAMAGE_AMOUNT_NSO1,
    ABILITY_RLF_DAMAGE_PERIOD,
    ABILITY_RLF_DAMAGE_PENALTY,
    ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_PERCENT_NSO4,
    ABILITY_RLF_ATTACK_SPEED_REDUCTION_PERCENT_NSO5,
    ABILITY_RLF_SPLIT_DELAY,
    ABILITY_RLF_MAX_HITPOINT_FACTOR,
    ABILITY_RLF_LIFE_DURATION_SPLIT_BONUS,
    ABILITY_RLF_WAVE_INTERVAL,
    ABILITY_RLF_BUILDING_DAMAGE_FACTOR_NVC4,
    ABILITY_RLF_FULL_DAMAGE_AMOUNT_NVC5,
    ABILITY_RLF_HALF_DAMAGE_FACTOR,
    ABILITY_RLF_INTERVAL_BETWEEN_PULSES
}

declare enum AbilityBooleanLevelField {
    ABILITY_BLF_PERCENT_BONUS_HAB2,
    ABILITY_BLF_USE_TELEPORT_CLUSTERING_HMT3,
    ABILITY_BLF_NEVER_MISS_OCR5,
    ABILITY_BLF_EXCLUDE_ITEM_DAMAGE,
    ABILITY_BLF_BACKSTAB_DAMAGE,
    ABILITY_BLF_INHERIT_UPGRADES_UAN3,
    ABILITY_BLF_MANA_CONVERSION_AS_PERCENT,
    ABILITY_BLF_LIFE_CONVERSION_AS_PERCENT,
    ABILITY_BLF_LEAVE_TARGET_ALIVE,
    ABILITY_BLF_PERCENT_BONUS_UAU3,
    ABILITY_BLF_DAMAGE_IS_PERCENT_RECEIVED,
    ABILITY_BLF_MELEE_BONUS,
    ABILITY_BLF_RANGED_BONUS,
    ABILITY_BLF_FLAT_BONUS,
    ABILITY_BLF_NEVER_MISS_HBH5,
    ABILITY_BLF_PERCENT_BONUS_HAD2,
    ABILITY_BLF_CAN_DEACTIVATE,
    ABILITY_BLF_RAISED_UNITS_ARE_INVULNERABLE,
    ABILITY_BLF_PERCENTAGE_OAR2,
    ABILITY_BLF_SUMMON_BUSY_UNITS,
    ABILITY_BLF_CREATES_BLIGHT,
    ABILITY_BLF_EXPLODES_ON_DEATH,
    ABILITY_BLF_ALWAYS_AUTOCAST_FAE2,
    ABILITY_BLF_REGENERATE_ONLY_AT_NIGHT,
    ABILITY_BLF_SHOW_SELECT_UNIT_BUTTON,
    ABILITY_BLF_SHOW_UNIT_INDICATOR,
    ABILITY_BLF_CHARGE_OWNING_PLAYER,
    ABILITY_BLF_PERCENTAGE_ARM2,
    ABILITY_BLF_TARGET_IS_INVULNERABLE,
    ABILITY_BLF_TARGET_IS_MAGIC_IMMUNE,
    ABILITY_BLF_KILL_ON_CASTER_DEATH,
    ABILITY_BLF_NO_TARGET_REQUIRED_REJ4,
    ABILITY_BLF_ACCEPTS_GOLD,
    ABILITY_BLF_ACCEPTS_LUMBER,
    ABILITY_BLF_PREFER_HOSTILES_ROA5,
    ABILITY_BLF_PREFER_FRIENDLIES_ROA6,
    ABILITY_BLF_ROOTED_TURNING,
    ABILITY_BLF_ALWAYS_AUTOCAST_SLO3,
    ABILITY_BLF_HIDE_BUTTON,
    ABILITY_BLF_USE_TELEPORT_CLUSTERING_ITP2,
    ABILITY_BLF_IMMUNE_TO_MORPH_EFFECTS,
    ABILITY_BLF_DOES_NOT_BLOCK_BUILDINGS,
    ABILITY_BLF_AUTO_ACQUIRE_ATTACK_TARGETS,
    ABILITY_BLF_IMMUNE_TO_MORPH_EFFECTS_GHO2,
    ABILITY_BLF_DO_NOT_BLOCK_BUILDINGS,
    ABILITY_BLF_INCLUDE_RANGED_DAMAGE,
    ABILITY_BLF_INCLUDE_MELEE_DAMAGE,
    ABILITY_BLF_MOVE_TO_PARTNER,
    ABILITY_BLF_CAN_BE_DISPELLED,
    ABILITY_BLF_IGNORE_FRIENDLY_BUFFS,
    ABILITY_BLF_DROP_ITEMS_ON_DEATH,
    ABILITY_BLF_CAN_USE_ITEMS,
    ABILITY_BLF_CAN_GET_ITEMS,
    ABILITY_BLF_CAN_DROP_ITEMS,
    ABILITY_BLF_REPAIRS_ALLOWED,
    ABILITY_BLF_CASTER_ONLY_SPLASH,
    ABILITY_BLF_NO_TARGET_REQUIRED_IRL4,
    ABILITY_BLF_DISPEL_ON_ATTACK,
    ABILITY_BLF_AMOUNT_IS_RAW_VALUE,
    ABILITY_BLF_SHARED_SPELL_COOLDOWN,
    ABILITY_BLF_SLEEP_ONCE,
    ABILITY_BLF_ALLOW_ON_ANY_PLAYER_SLOT,
    ABILITY_BLF_DISABLE_OTHER_ABILITIES,
    ABILITY_BLF_ALLOW_BOUNTY
}

declare enum AbilityStringLevelField {
    ABILITY_SLF_ICON_NORMAL,
    ABILITY_SLF_CASTER,
    ABILITY_SLF_TARGET,
    ABILITY_SLF_SPECIAL,
    ABILITY_SLF_EFFECT,
    ABILITY_SLF_AREA_EFFECT,
    ABILITY_SLF_LIGHTNING_EFFECTS,
    ABILITY_SLF_MISSILE_ART,
    ABILITY_SLF_TOOLTIP_LEARN,
    ABILITY_SLF_TOOLTIP_LEARN_EXTENDED,
    ABILITY_SLF_TOOLTIP_NORMAL,
    ABILITY_SLF_TOOLTIP_TURN_OFF,
    ABILITY_SLF_TOOLTIP_NORMAL_EXTENDED,
    ABILITY_SLF_TOOLTIP_TURN_OFF_EXTENDED,
    ABILITY_SLF_NORMAL_FORM_UNIT_EME1,
    ABILITY_SLF_SPAWNED_UNITS,
    ABILITY_SLF_ABILITY_FOR_UNIT_CREATION,
    ABILITY_SLF_NORMAL_FORM_UNIT_MIL1,
    ABILITY_SLF_ALTERNATE_FORM_UNIT_MIL2,
    ABILITY_SLF_BASE_ORDER_ID_ANS5,
    ABILITY_SLF_MORPH_UNITS_GROUND,
    ABILITY_SLF_MORPH_UNITS_AIR,
    ABILITY_SLF_MORPH_UNITS_AMPHIBIOUS,
    ABILITY_SLF_MORPH_UNITS_WATER,
    ABILITY_SLF_UNIT_TYPE_ONE,
    ABILITY_SLF_UNIT_TYPE_TWO,
    ABILITY_SLF_UNIT_TYPE_SOD2,
    ABILITY_SLF_SUMMON_1_UNIT_TYPE,
    ABILITY_SLF_SUMMON_2_UNIT_TYPE,
    ABILITY_SLF_RACE_TO_CONVERT,
    ABILITY_SLF_PARTNER_UNIT_TYPE,
    ABILITY_SLF_PARTNER_UNIT_TYPE_ONE,
    ABILITY_SLF_PARTNER_UNIT_TYPE_TWO,
    ABILITY_SLF_REQUIRED_UNIT_TYPE,
    ABILITY_SLF_CONVERTED_UNIT_TYPE,
    ABILITY_SLF_SPELL_LIST,
    ABILITY_SLF_BASE_ORDER_ID_SPB5,
    ABILITY_SLF_BASE_ORDER_ID_NCL6,
    ABILITY_SLF_ABILITY_UPGRADE_1,
    ABILITY_SLF_ABILITY_UPGRADE_2,
    ABILITY_SLF_ABILITY_UPGRADE_3,
    ABILITY_SLF_ABILITY_UPGRADE_4,
    ABILITY_SLF_SPAWN_UNIT_ID_NSY2
}

export class BuffId {
    constructor(id: int) {
        this.id = id;
    }
    static byId(id: int): BuffId {
        return new BuffId(id);
    }

    id: int;
}

export class AbilId {
    constructor(id: int) {
        this.id = id;
    }
    static byId(id: int): AbilId {
        return new AbilId(id);
    }
    static fromString(abilityIdString: string): AbilId {
        return this.byId(AbilityId(abilityIdString) as int);
    }

    static learnedSkill(): AbilId {
        return this.byId(GetLearnedSkill() as int);
    }
    static learnedSkillLevel(): int {
        return GetLearnedSkillLevel() as int;
    }
    static spellAbilityId(): AbilId {
        return this.byId(GetSpellAbilityId() as int);
    }

    static FIRST_LEVEL: int = 0 as int;

    id: int;

    toInt(): int {
        return this.id;
    }
    toString(): string {
        return AbilityId2String(this.id);
    }

    tooltip(level?: int): string {
        return BlzGetAbilityTooltip(this.id, level == undefined ? AbilId.FIRST_LEVEL : level);
    }
    setTooltip(tooltip: string, level?: int): void {
        BlzSetAbilityTooltip(this.id, tooltip, level == undefined ? AbilId.FIRST_LEVEL : level);
    }
    activatedTooltip(level?: int): string {
        return BlzGetAbilityActivatedTooltip(this.id, level == undefined ? AbilId.FIRST_LEVEL : level);
    }
    setActivatedTooltip(tooltip: string, level?: int): void {
        BlzSetAbilityActivatedTooltip(this.id, tooltip, level == undefined ? AbilId.FIRST_LEVEL : level);
    }
    extendedTooltip(level?: int): string {
        return BlzGetAbilityExtendedTooltip(this.id, level == undefined ? AbilId.FIRST_LEVEL : level);
    }
    setExtendedTooltip(extendedTooltip: string, level?: int): void {
        BlzSetAbilityExtendedTooltip(this.id, extendedTooltip, level == undefined ? AbilId.FIRST_LEVEL : level);
    }
    activatedExtendedTooltip(level?: int): string {
        return BlzGetAbilityActivatedExtendedTooltip(this.id, level == undefined ? AbilId.FIRST_LEVEL : level);
    }
    setActivatedExtendedTooltip(extendedTooltip: string, level?: int): void {
        BlzSetAbilityActivatedExtendedTooltip(this.id, extendedTooltip, level == undefined ? AbilId.FIRST_LEVEL : level);
    }
    researchTooltip(level?: int): string {
        return BlzGetAbilityResearchTooltip(this.id, level == undefined ? AbilId.FIRST_LEVEL : level);
    }
    setResearchTooltip(researchTooltip: string, level?: int): void {
        BlzSetAbilityResearchTooltip(this.id, researchTooltip, level == undefined ? AbilId.FIRST_LEVEL : level);
    }
    researchExtendedTooltip(level: int): string {
        return BlzGetAbilityResearchExtendedTooltip(this.id, level == undefined ? AbilId.FIRST_LEVEL : level);
    }
    setResearchExtendedTooltip(researchExtendedTooltip: string, level?: int): void {
        BlzSetAbilityResearchExtendedTooltip(this.id, researchExtendedTooltip, level == undefined ? AbilId.FIRST_LEVEL : level);
    }

    icon(): string {
        return BlzGetAbilityIcon(this.id);
    }
    setIcon(iconPath: string): void {
        BlzSetAbilityActivatedIcon(this.id, iconPath);
    }
    activatedIcon(): string {
        return BlzGetAbilityActivatedIcon(this.id);
    }
    setActivatedIcon(iconPath: string): void {
        BlzSetAbilityActivatedIcon(this.id, iconPath);
    }

    x(): int {
        return BlzGetAbilityPosX(this.id) as int;
    }
    y(): int {
        return BlzGetAbilityPosY(this.id) as int;
    }
    xy(): [int, int] {
        return [this.x(), this.y()];
    }
    setX(x: int): void {
        BlzSetAbilityPosX(this.id, x);
    }
    setY(y: int): void {
        BlzSetAbilityPosY(this.id, y);
    }
    setXY(xy: [int, int]): void {
        this.setX(xy[0]);
        this.setY(xy[1]);
    }
    activatedX(): int {
        return BlzGetAbilityActivatedPosX(this.id) as int;
    }
    activatedY(): int {
        return BlzGetAbilityActivatedPosY(this.id) as int;
    }
    activatedXY(): [int, int] {
        return [this.activatedX(), this.activatedY()];
    }
    setActivatedX(x: int): void {
        BlzSetAbilityActivatedPosX(this.id, x);
    }
    setActivatedY(y: int): void {
        BlzSetAbilityActivatedPosY(this.id, y);
    }
    setActivatedXY(xy: [int, int]): void {
        this.setActivatedX(xy[0]);
        this.setActivatedY(xy[1]);
    }

    manaCost(level?: int): number {
        return BlzGetAbilityManaCost(this.id, level == undefined ? AbilId.FIRST_LEVEL : level);
    }
    cooldown(level?: int): number {
        return BlzGetAbilityCooldown(this.id, level == undefined ? AbilId.FIRST_LEVEL : level);
    }
    effect(t: effecttype, index: int): string {
        return GetAbilityEffectById(this.id, t, index);
    }
    sound(t: soundtype): string {
        return GetAbilitySoundById(this.id, t);
    }
}

class Abil {
    constructor(abil: ability) {
        this.abil = abil;
    }
    static spellAbility(): Abil {
        return new Abil(GetSpellAbility());
    }

    abil: ability;

    static FIRST_LEVEL: int = 0 as int;

    booleanField(whichField: abilitybooleanfield): boolean {
        return BlzGetAbilityBooleanField(this.abil, whichField);
    }
    intField(whichField: abilityintegerfield): int {
        return BlzGetAbilityIntegerField(this.abil, whichField) as int;
    }
    realField(whichField: abilityrealfield): number {
        return BlzGetAbilityRealField(this.abil, whichField)
    }
    stringField(whichField: abilitystringfield): string {
        return BlzGetAbilityStringField(this.abil, whichField);
    }

    booleanLevelField(whichField: abilitybooleanlevelfield, level?: int): boolean {
        return BlzGetAbilityBooleanLevelField(this.abil, whichField, level == undefined ? Abil.FIRST_LEVEL : level);
    }
    intLevelField(whichField: abilityintegerlevelfield, level?: int): number {
        return BlzGetAbilityIntegerLevelField(this.abil, whichField, level == undefined ? Abil.FIRST_LEVEL : level);
    }
    realLevelField(whichField: abilityreallevelfield, level?: int): number {
        return BlzGetAbilityRealLevelField(this.abil, whichField, level == undefined ? Abil.FIRST_LEVEL : level);
    }
    stringLevelField(whichField: abilitystringlevelfield, level?: int): string {
        return BlzGetAbilityStringLevelField(this.abil, whichField, level == undefined ? Abil.FIRST_LEVEL : level);
    }

    booleanLevelArrayField(whichField: abilitybooleanlevelarrayfield, index: int, level?: int): boolean {
        return BlzGetAbilityBooleanLevelArrayField(this.abil, whichField, level == undefined ? Abil.FIRST_LEVEL : level, index);
    }
    intLevelArrayField(whichField: abilityintegerlevelarrayfield, index: int, level?: int): int {
        return BlzGetAbilityIntegerLevelArrayField(this.abil, whichField, level == undefined ? Abil.FIRST_LEVEL : level, index) as int;
    }
    realLevelArrayField(whichField: abilityreallevelarrayfield, index: int, level?: int): number {
        return BlzGetAbilityRealLevelArrayField(this.abil, whichField, level == undefined ? Abil.FIRST_LEVEL : level, index);
    }
    stringLevelArrayField(whichField: abilitystringlevelarrayfield, index: int, level?: int): string {
        return BlzGetAbilityStringLevelArrayField(this.abil, whichField, level == undefined ? Abil.FIRST_LEVEL : level, index);
    }

    setBooleanField(whichField: abilitybooleanfield, value: boolean): boolean {
        return BlzSetAbilityBooleanField(this.abil, whichField, value);
    }
    setIntField(whichField: abilityintegerfield, value: number): boolean {
        return BlzSetAbilityIntegerField(this.abil, whichField, value);
    }
    setRealField(whichField: abilityrealfield, value: number): boolean {
        return BlzSetAbilityRealField(this.abil, whichField, value);
    }
    setStringField(whichField: abilitystringfield, value: string): boolean {
        return BlzSetAbilityStringField(this.abil, whichField, value);
    }

    setBooleanLevelField(whichField: abilitybooleanlevelfield, value: boolean, level?: int): boolean {
        return BlzSetAbilityBooleanLevelField(this.abil, whichField, level == undefined ? Abil.FIRST_LEVEL : level, value);
    }
    setIntLevelField(whichField: abilityintegerlevelfield, value: number, level?: int): boolean {
        return BlzSetAbilityIntegerLevelField(this.abil, whichField, level == undefined ? Abil.FIRST_LEVEL : level, value);
    }
    setRealLevelField(whichField: abilityreallevelfield, value: number, level?: int): boolean {
        return BlzSetAbilityRealLevelField(this.abil, whichField, level == undefined ? Abil.FIRST_LEVEL : level, value);
    }
    setStringLevelField(whichField: abilitystringlevelfield, value: string, level?: int): boolean {
        return BlzSetAbilityStringLevelField(this.abil, whichField, level == undefined ? Abil.FIRST_LEVEL : level, value);
    }

    setBooleanLevelArrayField(whichField: abilitybooleanlevelarrayfield, index: int, value: boolean, level?: int): boolean {
        return BlzSetAbilityBooleanLevelArrayField(this.abil, whichField, level == undefined ? Abil.FIRST_LEVEL : level, index, value);
    }
    setIntLevelArrayField(whichField: abilityintegerlevelarrayfield, index: int, value: number, level?: int): boolean {
        return BlzSetAbilityIntegerLevelArrayField(this.abil, whichField, level == undefined ? Abil.FIRST_LEVEL : level, index, value);
    }
    setRealLevelArrayField(whichField: abilityreallevelarrayfield, index: int, value: number, level?: int): boolean {
        return BlzSetAbilityRealLevelArrayField(this.abil, whichField, level == undefined ? Abil.FIRST_LEVEL : level, index, value);
    }
    setStringLevelArrayField(whichField: abilitystringlevelarrayfield, index: int, value: string, level?: int): boolean {
        return BlzSetAbilityStringLevelArrayField(this.abil, whichField, level == undefined ? Abil.FIRST_LEVEL : level, index, value);
    }

    addBooleanLevelArrayField(whichField: abilitybooleanlevelarrayfield, value: boolean, level?: int): boolean {
        return BlzAddAbilityBooleanLevelArrayField(this.abil, whichField, level == undefined ? Abil.FIRST_LEVEL : level, value);
    }
    addIntLevelArrayField(whichField: abilityintegerlevelarrayfield, value: number, level?: int): boolean {
        return BlzAddAbilityIntegerLevelArrayField(this.abil, whichField, level == undefined ? Abil.FIRST_LEVEL : level, value);
    }
    addRealLevelArrayField(whichField: abilityreallevelarrayfield, value: number, level?: int): boolean {
        return BlzAddAbilityRealLevelArrayField(this.abil, whichField, level == undefined ? Abil.FIRST_LEVEL : level, value);
    }
    addStringLevelArrayField(whichField: abilitystringlevelarrayfield, value: string, level?: int): boolean {
        return BlzAddAbilityStringLevelArrayField(this.abil, whichField, level == undefined ? Abil.FIRST_LEVEL : level, value);
    }

    removeBooleanLevelArrayField(whichField: abilitybooleanlevelarrayfield, value: boolean, level?: int): boolean {
        return BlzRemoveAbilityBooleanLevelArrayField(this.abil, whichField, level == undefined ? Abil.FIRST_LEVEL : level, value);
    }
    removeIntLevelArrayField(whichField: abilityintegerlevelarrayfield, value: number, level?: int): boolean {
        return BlzRemoveAbilityIntegerLevelArrayField(this.abil, whichField, level == undefined ? Abil.FIRST_LEVEL : level, value);
    }
    removeRealLevelArrayField(whichField: abilityreallevelarrayfield, value: number, level?: int): boolean {
        return BlzRemoveAbilityRealLevelArrayField(this.abil, whichField, level == undefined ? Abil.FIRST_LEVEL : level, value);
    }
    removeStringLevelArrayField(whichField: abilitystringlevelarrayfield, value: string, level?: int): boolean {
        return BlzRemoveAbilityStringLevelArrayField(this.abil, whichField, level == undefined ? Abil.FIRST_LEVEL : level, value);
    }
}